package cn.sciento.farm.devicemanager.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

/**
 * <p>
 * 开关日志
 * </p>
 *
 * @author wumu
 * @since 2019-06-21
 */
public class DevControllerLog extends Model<DevControllerLog> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long controllerId;

    private String name;

    private Integer action;

    private Integer result;

    private Integer duration;

    private Long startTime;

    /**
     * 开关的方式
     */
    private String type;

    /**
     * 与之相关的定时任务
     */
    private Long timerId;

    /**
     * 与之相关的策略
     */
    private Long strategyId;

    private String tenantId;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getControllerId() {
        return controllerId;
    }

    public void setControllerId(Long controllerId) {
        this.controllerId = controllerId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAction() {
        return action;
    }

    public void setAction(Integer action) {
        this.action = action;
    }

    public Integer getResult() {
        return result;
    }

    public void setResult(Integer result) {
        this.result = result;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Long getTimerId() {
        return timerId;
    }

    public void setTimerId(Long timerId) {
        this.timerId = timerId;
    }

    public Long getStrategyId() {
        return strategyId;
    }

    public void setStrategyId(Long strategyId) {
        this.strategyId = strategyId;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "DevControllerLog{" +
        "id=" + id +
        ", controllerId=" + controllerId +
        ", name=" + name +
        ", action=" + action +
        ", result=" + result +
        ", duration=" + duration +
        ", startTime=" + startTime +
        ", type=" + type +
        ", timerId=" + timerId +
        ", strategyId=" + strategyId +
        ", tenantId=" + tenantId +
        "}";
    }
}
